/*
 * @Author: jiu yin
 * @Date: 2024-04-09 11:14:36
 * @LastEditTime: 2024-04-26 16:56:02
 * @LastEditors: jiu yin zhen jing
 * @FilePath: \web-smart-tour\src\store\modules\userInfo.js
 * jiu
 */


const state = () => ({
	is_login_popup: false,
	is_login_disabled: false,
	audio_show: false,
	user_info: uni.getStorageSync("userinfo") || {},
	rec_url: uni.getStorageSync("recUrl") || "",
	fileDeploy: uni.getStorageSync("fileDeploy") || {},
	aiPhoto:uni.getStorageSync('aiPhoto') || {}
	
	
})
const mutations = {
	set_is_login_popup(state, boolean) {
		state.is_login_popup = boolean;
	},
	set_is_login_disabled(state, boolean) {
		state.is_login_disabled = boolean;
	},
	set_audio_show(state, boolean) {
		state.audio_show = boolean;
	},
	set_user_info(state, value) {
		state.user_info = value;
		uni.setStorageSync("userinfo", value);
	},
	set_rec_url(state, value) {
		console.log(value, '5689')
		state.rec_url = value;
		uni.setStorageSync("recUrl", value);
	},
	set_fileDeploy(state, obj) {
		state.fileDeploy = obj;
		uni.setStorageSync("fileDeploy", obj);
	},
	
	set_aiPhoto(state,obj){
		state.aiPhoto = obj;
		uni.setStorageSync("aiPhoto", obj);
	}
}
const actions = {

}

export default {
	state,
	mutations,
	actions,
	namespaced: true,
}